<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Book List</title>
</head>
<body>
	<h4>Books Page</h4>

	<a href="bookDetails.jsp?book=JavaWeb">Java Web</a>
	<br />
	<a href="bookDetails.jsp?book=Java">Java</a>
	<br />
	<a href="bookDetails.jsp?book=Oracle">Oracle</a>
	<br />
	<a href="bookDetails.jsp?book=Ajax">Ajax</a>
	<br />
	<a href="bookDetails.jsp?book=JavaScript">JavaScript</a>
	<br />
	<a href="bookDetails.jsp?book=Android">Android</a>
	<br />
	<a href="bookDetails.jsp?book=Jbpm">Jbpm</a>
	<br />
	<a href="bookDetails.jsp?book=Struts">Struts</a>
	<br />
	<a href="bookDetails.jsp?book=Hibernate">Hibernate</a>
	<br />
	<a href="bookDetails.jsp?book=Spring">Spring</a>
	<br />
	<br />
	<br />

	<%
		out.print("最近浏览过" + "<br/>");
		Cookie[] cookies = request.getCookies();

		if (cookies != null && cookies.length > 0) {
			for (Cookie cookie : cookies) {
				String cookieName = cookie.getName();
				if (cookieName.startsWith("BKL")) {
					out.print(cookie.getValue() + "<br/>");
				}
			}
		}
	%>
</body>
</html>